package java.socket;



import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    private ServerSocket serverSocket;
    public Server() {
        try {
            System.out.println("正在启动服务端。。。");
            serverSocket =new ServerSocket(8088);
            System.out.println("服务端启动完毕，保持开启哦");

        } catch (IOException e) {
            throw new RuntimeException(e);
        }

    }
    public void start() {

        try {
            System.out.println("等待客户端链接，请稍后");
            Socket socket = serverSocket.accept();


        } catch (Exception e) {
            throw new RuntimeException(e);
        }

    }

    public static void main(String[] args) {
        Server server = new Server();
        server.start();
    }



}
